public class Test {
    public int a;

    public Test(int a) {
        this.a = a;
        System.out.println("父类：构造方法执行");
    }

    {
        System.out.println("父类：实例代码块执行");
    }
    static {
        System.out.println("父类：静态代码块执行");
    }
}

class Stu extends Test {
    public Stu(int a) {
        super(a);
        System.out.println("子类：构造方法执行");
    }
    {
        System.out.println("子类：实例代码块执行");
    }
    static {
        System.out.println("子类：静态代码块执行");
    }
}
class TestDemo {
    public static void main(String[] args) {

        Stu stu1 = new Stu(10);
        System.out.println("====分割线====");
        Stu stu2 = new Stu(20);

    }
}